package com.guet.upsum.controller;

import com.guet.common.response.ResultCodeEnum;
import com.guet.common.response.ResultVO;
import com.guet.upsum.beans.vo.UpsumVO;
import com.guet.upsum.service.IUpsumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Li
 * @create 2022-12-20-12:30
 */
@RestController
@RequestMapping("/upsum")
public class UpsumController {
    @Autowired
    IUpsumService upsumService;

    @RequestMapping("/up")
    public ResultVO<UpsumVO> up(@RequestParam Integer userId, @RequestParam Integer issueId){

        UpsumVO upsum = upsumService.up(userId, issueId);

        return new ResultVO<>(ResultCodeEnum.SUCCESS, upsum);

    }
}
